﻿using System;
using System.Collections.Generic;
using System.Text;

namespace BOHVote.Core
{
    internal class Constant
    {
        public const string TRANSACTION_NEED_BEGIN_FIRST_EXCEPTION_MESSAGE = "Transaction needs to begin first.";
        public const string TRANSACTION_ALREADY_OPEN_EXCEPTION_MESSAGE = "Transaction already open.";
        public const string DATABASE_NULL_EXCEPTION_MESSAGE = "Database instance name can not be Null or empty.";

        public const string CLIENTSERVICESECTION_PROVIDERS = "providers";
        public const string CLIENTSERVICESECTION_DEFAULTPROVIDER = "defaultProvider";
        public const string CLIENTSERVICESECTION_SQLCLIENTPROVIDER = "SqlClientProvider";
        public const string CLIENTPROVIDERCOLLECTION_PROVIDER = "Provider";

        public const string PROVIDER_NAME_DEFAULT_CRYPTOGRAPHY = "DefaultCryptographyProvider";

        public const string UTILITY_SQLINJECTION_REGEX = @"\s?;\s?|\s?drop\s|\s?grant\s|^'|\s?--|\s?union\s|\s?delete\s|\s?truncate\s|\s?sysobjects\s?|\s?xp_.*?|\s?syslogins\s?|\s?sysremote\s?|\s?sysusers\s?|\s?sysxlogins\s?|\s?sysdatabases\s?|\s?aspnet_.*?|\s?exec\s?|";

        public const string UTILITY_TRANSACTION_UNOPEN_EXCEPTION = "Transaction must be open before executing a query.";
        public const string UTILITY_COLUMNNAME = "ColumnName";
        public const string UTILITY_DATATYPE = "DataType";
        public const string UTILITY_ROWSAFFECTED = "RowsAffected";
    }
}
